<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class Job extends Model
{
	use HasDateTimeFormatter;

    protected $fillable = [
        'user_id',
        'post_id',
        'post_title',
        'firm_profession_id',
        'province',
        'city',
        'area',
        'exp',
        'curriculum_vitae',
        'contact_name',
        'expected_salary',
        'expect',
        'contact_phone'
    ];

    protected $attributes = [
        'status' => 1
    ];

    public function user()
    {
        return $this->belongsTo(User::class,'user_id');
    }

    public function post()
    {
        return $this->belongsTo(Post::class,'post_id');
    }


    public function profession()
    {
        return $this->belongsTo(FirmProfession::class,'firm_profession_id');
    }
}
